/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ats.org.entities;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author ghanem
 */
@Entity
@Table(name = "WEB_APPLICATIONS")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "WebApplication.findAll", query = "SELECT w FROM WebApplication w"),
    @NamedQuery(name = "WebApplication.findByApplicationNo", query = "SELECT w FROM WebApplication w WHERE w.applicationNo = :applicationNo")})
public class WebApplication implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "APPLICATION_NO")
    private Integer applicationNo;
    @Size(max = 40)
    @Column(name = "FIRST_NAME")
    private String firstName;
    @Size(max = 40)
    @Column(name = "LAST_NAME")
    private String lastName;
    @Size(max = 40)
    @Column(name = "FIRST_NAME_S")
    private String firstNameS;
    @Size(max = 40)
    @Column(name = "LAST_NAME_S")
    private String lastNameS;
    @Column(name = "GENDER")
    private Short gender;
    @Column(name = "BIRTH_DATE")
    @Temporal(TemporalType.DATE)
    private Date birthDate;
    @Column(name = "NATIONALITY")
    private Short nationality;
    // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
    @Size(max = 100)
    @Column(name = "EMAIL")
    private String email;
    @Column(name = "COUNTRY_NO")
    private Short countryNo;
    @Size(max = 40)
    @Column(name = "CITY")
    private String city;
    @Size(max = 100)
    @Column(name = "ADDRESS")
    private String address;
    @Column(name = "POSTAL_CODE")
    private Integer postalCode;
    @Size(max = 100)
    @Column(name = "PO_BOX")
    private String poBox;
    @Column(name = "PHONE_NO")
    private Long phoneNo;
    @Column(name = "FAX_NO")
    private Long faxNo;
    @Column(name = "SCHOOL_COUNTRY")
    private Short schoolCountry;
    @Column(name = "SCHOOL_YEAR")
    private Short schoolYear;
    @Column(name = "GRADING_CODE")
    private Short gradingCode;
    @Size(max = 10)
    @Column(name = "GRADING_MAX")
    private String gradingMax;
    @Size(max = 10)
    @Column(name = "OPTAINED_GRADE")
    private String optainedGrade;
    @Size(max = 10)
    @Column(name = "GRADE_EVALUATION")
    private String gradeEvaluation;
    @Size(max = 60)
    @Column(name = "SCHOOL_BRANCH")
    private String schoolBranch;
    @Column(name = "IS_TRANSFERED")
    private Short isTransfered;
    @Size(max = 1000)
    @Column(name = "NOTE")
    private String note;
    @Size(max = 100)
    @Column(name = "MODIFY_COUNTRY")
    private String modifyCountry;
    @Size(max = 20)
    @Column(name = "MODIFY_TIME")
    private String modifyTime;
    @Column(name = "TARGET_DEGREE")
    private BigInteger targetDegree;
    @Column(name = "LAST_DEGREE")
    private BigInteger lastDegree;
    @Column(name = "LAST_GRADUATION_YEAR")
    private BigInteger lastGraduationYear;
    @Column(name = "LAST_GRADUATION_SEMESTER")
    private BigInteger lastGraduationSemester;
    @Size(max = 300)
    @Column(name = "LAST_UNIVERSITY_NAME")
    private String lastUniversityName;
    @Size(max = 300)
    @Column(name = "LAST_MAJOR_DESC")
    private String lastMajorDesc;
    @Column(name = "ENTRY_DATE")
    @Temporal(TemporalType.DATE)
    private Date entryDate;

    public WebApplication() {
    }

    public WebApplication(Integer applicationNo) {
        this.applicationNo = applicationNo;
    }

    public Integer getApplicationNo() {
        return applicationNo;
    }

    public void setApplicationNo(Integer applicationNo) {
        this.applicationNo = applicationNo;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getFirstNameS() {
        return firstNameS;
    }

    public void setFirstNameS(String firstNameS) {
        this.firstNameS = firstNameS;
    }

    public String getLastNameS() {
        return lastNameS;
    }

    public void setLastNameS(String lastNameS) {
        this.lastNameS = lastNameS;
    }

    public Short getGender() {
        return gender;
    }

    public void setGender(Short gender) {
        this.gender = gender;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public Short getNationality() {
        return nationality;
    }

    public void setNationality(Short nationality) {
        this.nationality = nationality;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Short getCountryNo() {
        return countryNo;
    }

    public void setCountryNo(Short countryNo) {
        this.countryNo = countryNo;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(Integer postalCode) {
        this.postalCode = postalCode;
    }

    public String getPoBox() {
        return poBox;
    }

    public void setPoBox(String poBox) {
        this.poBox = poBox;
    }

    public Long getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(Long phoneNo) {
        this.phoneNo = phoneNo;
    }

    public Long getFaxNo() {
        return faxNo;
    }

    public void setFaxNo(Long faxNo) {
        this.faxNo = faxNo;
    }

    public Short getSchoolCountry() {
        return schoolCountry;
    }

    public void setSchoolCountry(Short schoolCountry) {
        this.schoolCountry = schoolCountry;
    }

    public Short getSchoolYear() {
        return schoolYear;
    }

    public void setSchoolYear(Short schoolYear) {
        this.schoolYear = schoolYear;
    }

    public Short getGradingCode() {
        return gradingCode;
    }

    public void setGradingCode(Short gradingCode) {
        this.gradingCode = gradingCode;
    }

    public String getGradingMax() {
        return gradingMax;
    }

    public void setGradingMax(String gradingMax) {
        this.gradingMax = gradingMax;
    }

    public String getOptainedGrade() {
        return optainedGrade;
    }

    public void setOptainedGrade(String optainedGrade) {
        this.optainedGrade = optainedGrade;
    }

    public String getGradeEvaluation() {
        return gradeEvaluation;
    }

    public void setGradeEvaluation(String gradeEvaluation) {
        this.gradeEvaluation = gradeEvaluation;
    }

    public String getSchoolBranch() {
        return schoolBranch;
    }

    public void setSchoolBranch(String schoolBranch) {
        this.schoolBranch = schoolBranch;
    }

    public Short getIsTransfered() {
        return isTransfered;
    }

    public void setIsTransfered(Short isTransfered) {
        this.isTransfered = isTransfered;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getModifyCountry() {
        return modifyCountry;
    }

    public void setModifyCountry(String modifyCountry) {
        this.modifyCountry = modifyCountry;
    }

    public String getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }

    public BigInteger getTargetDegree() {
        return targetDegree;
    }

    public void setTargetDegree(BigInteger targetDegree) {
        this.targetDegree = targetDegree;
    }

    public BigInteger getLastDegree() {
        return lastDegree;
    }

    public void setLastDegree(BigInteger lastDegree) {
        this.lastDegree = lastDegree;
    }

    public BigInteger getLastGraduationYear() {
        return lastGraduationYear;
    }

    public void setLastGraduationYear(BigInteger lastGraduationYear) {
        this.lastGraduationYear = lastGraduationYear;
    }

    public BigInteger getLastGraduationSemester() {
        return lastGraduationSemester;
    }

    public void setLastGraduationSemester(BigInteger lastGraduationSemester) {
        this.lastGraduationSemester = lastGraduationSemester;
    }

    public String getLastUniversityName() {
        return lastUniversityName;
    }

    public void setLastUniversityName(String lastUniversityName) {
        this.lastUniversityName = lastUniversityName;
    }

    public String getLastMajorDesc() {
        return lastMajorDesc;
    }

    public void setLastMajorDesc(String lastMajorDesc) {
        this.lastMajorDesc = lastMajorDesc;
    }

    public Date getEntryDate() {
        return entryDate;
    }

    public void setEntryDate(Date entryDate) {
        this.entryDate = entryDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (applicationNo != null ? applicationNo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof WebApplication)) {
            return false;
        }
        WebApplication other = (WebApplication) object;
        if ((this.applicationNo == null && other.applicationNo != null) || (this.applicationNo != null && !this.applicationNo.equals(other.applicationNo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ats.edugate.model.entities.WebApplication[ applicationNo=" + applicationNo + " ]";
    }
    
}
